package com.pyrsana.faith.retreat

import java.util.Date;

import com.pyrsana.faith.membership.Profile

class Registration {

    static belongsTo = [retreat:Retreat]
    
    static hasMany = [customFields:RegistrationCustomField, rideRequests:RideRequest, workshopRequests:WorkshopRequest]
    
    Profile profile
    String notes
    boolean completed = false
    boolean signed = false
    Date dateCreated
    Date lastUpdated
    
    // Custom fields:
    boolean formsSubmitted = false
    boolean paid = false
    String tshirtSize
    String homeChurch
    String signer
    String emergencyContact
    String emergencyContactDayPhone
    String emergencyContactNightPhone
    String insuranceCompany
    String insurancePolicy
    
    
    
    static constraints = {
		tshirtSize (size:1..2, blank:false)
        notes (size:0..2550)
    }
}
